﻿<%@ Page Title="Admin Opret Afdeling" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="adminDepartmentCreate.aspx.cs" Inherits="UCNKompetenceBors.Admin.adminDepartmentCreate" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="adminWrapper" class="contentSmallWrapper floatLeft">
        <div id="adminSubMenuBox" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminDashboard" runat="server" Text="Admin Dashboard"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkUserHandling" runat="server" Text="Brugerhåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminExchange" runat="server" Text="Køb og Salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkNewsHandling" runat="server" Text="Nyhedshåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditInformation" runat="server" Text="Ret Information"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hylinkContactPersons" runat="server" Text="Kontaktpersoner"></asp:HyperLink>
                    </li>
                    <li>
                        <asp:HyperLink ID="hylinkDepartment" runat="server" Text="Afdelinger"></asp:HyperLink>
                        <ul>
                            <li>
                                <asp:HyperLink ID="hylinkDepartmentCreate" runat="server" Text="Opret afdeling" ForeColor="#FF9933"></asp:HyperLink></li>
                        </ul>
                    </li>
                    <li>
                        <asp:HyperLink ID="hyLinkResetUsers" runat="server" Text="Reset Brugere"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="adminContentBox" class="contentBoxSmall floatLeft">
            <div id="adminContentBoxContent" class="floatLeft">
                <div class="inputFormSmall floatLeft">
                    <asp:Panel ID="panAdminCreateDepartment" runat="server">
                        <div class="inputFormSmallLeft floatLeft">
                            <div class="inputFormSmallRow floatLeft">
                                <asp:Label ID="lblAdminContentHeader" runat="server" Text="Opret Afdeling" CssClass="contentTitle"></asp:Label>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentName" runat="server" Text="Navn:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentName" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalName" runat="server" ErrorMessage="Name is required" ToolTip="Name is required" Text="*" ControlToValidate="txtCreateDepartmentName" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentAddress" runat="server" Text="Adresse:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentAddress" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalAddress" runat="server" ErrorMessage="Address is required" ToolTip="Address is required" Text="*" ControlToValidate="txtCreateDepartmentAddress" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentZipCity" runat="server" Text="Postnummer og By:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentZipCode" runat="server" Width="100px" MaxLength="4"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalZipCode" runat="server" ErrorMessage="Zip code is required" ToolTip="Zip Code is required" Text="*" ControlToValidate="txtCreateDepartmentZipCode" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:TextBox ID="txtCreateDepartmentCity" runat="server" Width="183px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalCity" runat="server" ErrorMessage="City is required" ToolTip="City is required" Text="*" ControlToValidate="txtCreateDepartmentCity" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentEmail" runat="server" Text="E-mail:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentEmail" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalEmail" runat="server" ErrorMessage="E-mail is required" ToolTip="E-mail is required" Text="*" ControlToValidate="txtCreateDepartmentEmail" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="regexvalEmail" runat="server" ErrorMessage="Den valgte E-mail er ugyldig" ValidationExpression="^.+@[^\.].*\.[a-z]{2,}$" ControlToValidate="txtCreateDepartmentEmail" ValidationGroup="AdminCreateDepartment" ToolTip="Den valgte E-mail er ugyldig" Display="Dynamic" Text="*" ForeColor="Red"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentPhone" runat="server" Text="Telefon:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentPhone" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalPhone" runat="server" ErrorMessage="Phone is required" ToolTip="Phone is required" Text="*" ControlToValidate="txtCreateDepartmentPhone" ValidationGroup="AdminCreateDepartment" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="regexvalPhone" runat="server" ErrorMessage="Det valgte telefonnummer er ugyldigt" ToolTip="Det valgte telefonnummer er ugyldigt" ValidationGroup="AdminCreateDepartment" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtCreateDepartmentPhone" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentFax" runat="server" Text="Fax:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateDepartmentFax" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="regexvalFax" runat="server" ErrorMessage="Den valgte fax er ugyldig" ToolTip="Den valgte fax er ugyldig" ValidationGroup="AdminCreateDepartment" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtCreateDepartmentFax" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateDepartmentImage" runat="server" Text="Billede:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:FileUpload ID="fuCreateDepartmentImage" runat="server" />
                                    <br />
                                    <asp:RegularExpressionValidator ID="regexvalImage" runat="server" ForeColor="Red" ControlToValidate="fuCreateDepartmentImage" ValidationGroup="AdminCreateDepartment" ErrorMessage="Filen du prøver at uploade er ikke tilladt" ValidationExpression=".*(\.[Jj][Pp][Gg]|\.[Gg][Ii][Ff]|\.[Jj][Pp][Ee][Gg]|\.[Pp][Nn][Gg])"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="floatRight">
                                    <asp:Button ID="btnCreateDepartment" runat="server" Text="Opret Afdeling" ValidationGroup="AdminCreateDepartment" CssClass="button" OnClick="btnCreateDepartment_Click" />
                                </div>
                            </div>
                        </div>
                        <div class="inputFormSmallRight floatRight">
                            <asp:ValidationSummary ID="valSumCreateDepartment" ValidationGroup="AdminCreateDepartment" runat="server" HeaderText="Følgende fejl blev fundet:" ForeColor="Red" />
                        </div>
                    </asp:Panel>

                    <asp:Label ID="lblCreatedepartmentSucces" runat="server" Text="Afdelingen er nu oprettet"></asp:Label>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
